<%@ tag isELIgnored="false" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ attribute name="lines" required="true" %>
<%@ attribute name="multiple" required="false" %>
<%@ attribute name="bean" required="true" %>

<!-- TODO Eviter la duplication du code -->
<logic:present name="multiple">
  <html:select property="${bean}" size="${lines}" multiple="${multiple}">
  	 <logic:equal name="lines" value="1">
     	<option />
     </logic:equal>
     <logic:present name="COMPETENCE">
        <html:options property="id" labelProperty="nom" collection="COMPETENCE"/>
  	 </logic:present>
  </html:select>
</logic:present>
<logic:notPresent name="multiple">
  <html:select property="${bean}" size="${lines}">
  	 <logic:equal name="lines" value="1">
     	<option />
     </logic:equal>
     <logic:present name="COMPETENCE">
        <html:options property="id" labelProperty="nom" collection="COMPETENCE"/>
  	 </logic:present>
  </html:select>
</logic:notPresent>
